Skip to content

Document self-referential extras now that pip officially supports it - #2087

Open
Trenza1ore wants to merge 5 commits into
pypa:mainfrom
Trenza1ore:main
Open

Document self-referential extras now that pip officially supports it#2087
Trenza1ore wants to merge 5 commits into
pypa:mainfrom
Trenza1ore:main

Conversation

@Trenza1ore

@Trenza1ore Trenza1ore commented Jul 10, 2026

Copy link
Copy Markdown

Using self-referential extras is a more preferable pattern than to manually write, for example, an all extra for all dependencies combined (which is both tedious and easy to fall out of sync with reality).

Following pypa/pip#14157, this is now a documented and tested feature of pip (supported unofficially since v21.2).

Update: check https://github.com/Trenza1ore/Self-Referential-Extras for which installer / dependency manager currently supports installing with self-referential extras.

Closes #2086


📚 Documentation preview 📚: https://python-packaging-user-guide--2087.org.readthedocs.build/en/2087/

@henryiii

henryiii commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Should there also be a "several installers" note in the writing toml page? I think it's not officially a standard, this is just says most installers support it? Getting it standardized is a bigger effort (but maybe a worthwhile one?).

@Trenza1ore

Trenza1ore commented Aug 5, 2026

Copy link
Copy Markdown
Author

Should there also be a "several installers" note in the writing toml page? I think it's not officially a standard, this is just says most installers support it?

I'll update the toml page with a list of package installers supporting self-referential extras. Will test a few more and make a list.

Getting it standardized is a bigger effort (but maybe a worthwhile one?).

Totally agree, that should probably be standardized at some point as there are many packages using self-referential extras already.

@henryiii

henryiii commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

You have a note on one of the two pages, having it on the other makes sense too. I think pip + uv is fine, but if you want to add more (Poetry?), the more the merrier (within reason!). :)

@Trenza1ore

Copy link
Copy Markdown
Author

You have a note on one of the two pages, having it on the other makes sense too. I think pip + uv is fine, but if you want to add more (Poetry?), the more the merrier (within reason!). :)

I've updated the list of supported installers/dependency managers, created a test repo at https://github.com/Trenza1ore/Self-Referential-Extras to verify. Anything except conda stuffs should work. 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document self-referential extras now that pip officially supports it

2 participants